package org.huatek.anders.validator;

import org.apache.commons.lang.StringUtils;
import org.huatek.anders.exception.ApiException;

/**
 * 数据校验
 * @author anders
 *
 */
public class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new ApiException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new ApiException(message);
        }
    }
}
